﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using HeartLess.Managers;
using HeartLess.Core;
using HeartLess.Activities;
using HeartLess.LevelData;

namespace HeartLess.GameObjects
{
    public class EndBlock : Block
    {
        private Texture2D _blockSprite;

        public EndBlock(Point location, bool floating)
            : base(location, floating)
        {
            IsCollisionListener = true;
            _blockSprite = AssetManager.GetSpriteTexture(Level.END_BLOCK);
        }

        protected override void handleCollision(CollidableGameObject collidedObject)
        {
            GameActivity.Instance.StartNextLevel();
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            Screen.Draw(spriteBatch, Bounds, _blockSprite);
        }
    }
}
